package com.platform.modules.wallet.take;

import cn.hutool.core.date.DateUtil;
import com.platform.modules.chat.domain.ChatUser;
import com.platform.modules.chat.service.ChatUserService;
import com.platform.modules.wallet.domain.WalletRedPacketSub;
import com.platform.modules.wallet.domain.WalletTransfer;
import com.platform.modules.wallet.service.WalletDailyBillhService;
import com.platform.modules.wallet.service.WalletRedPacketSubService;
import com.platform.modules.wallet.service.WalletTransferService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Component
public class DailyBillTask {

    @Resource
    private WalletDailyBillhService walletDailyBillhService;

    /**
     * 定时退款
     */
    @Scheduled(cron = "0 0 0 * * ?")//"0 5/10 9-23 * * ?"
    public void runRefund() {

        walletDailyBillhService.createDailyBill();

        System.out.println("这是每天0点" + DateUtil.date());
    }
}
